Fix bug where moving a toplevel window immediately after sizing it would
authorOwen Taylor <otaylor@redhat.com>
Fri, 1 Sep 2000 20:10:58 +0000 (20:10 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Fri, 1 Sep 2000 20:10:58 +0000 (20:10 +0000)
Fri Sep  1 15:34:46 2000  Owen Taylor  <otaylor@redhat.com>

* gdk/x11/gdkwindow-x11.c (gdk_window_move): Fix bug where
moving a toplevel window immediately after sizing it would
result in it being sized back to the old size since
impl->width, impl->height aren't updated until we hear
back from the server. There is still a (longstanding) bug
here that gdk_window_get_size() will give the wrong size
until we do hear back.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gdk/x11/gdkwindow-x11.c

index 85e21e8f78fdaef18dc6395f67b3c54b14688b47..f18fe87bddf292eb61640b8cbb08c0e33717c657 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+Fri Sep  1 15:34:46 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/gdkwindow-x11.c (gdk_window_move): Fix bug where
+       moving a toplevel window immediately after sizing it would
+       result in it being sized back to the old size since 
+       impl->width, impl->height aren't updated until we hear
+       back from the server. There is still a (longstanding) bug
+       here that gdk_window_get_size() will give the wrong size
+       until we do hear back.
+
 2000-08-31  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktextiter.h, gtk/gtktextiter.c, gtk/gtktextlayout.h, 
index 85e21e8f78fdaef18dc6395f67b3c54b14688b47..f18fe87bddf292eb61640b8cbb08c0e33717c657 100644 (file)
@@ -1,3 +1,13 @@
+Fri Sep  1 15:34:46 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/gdkwindow-x11.c (gdk_window_move): Fix bug where
+       moving a toplevel window immediately after sizing it would
+       result in it being sized back to the old size since 
+       impl->width, impl->height aren't updated until we hear
+       back from the server. There is still a (longstanding) bug
+       here that gdk_window_get_size() will give the wrong size
+       until we do hear back.
+
 2000-08-31  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktextiter.h, gtk/gtktextiter.c, gtk/gtktextlayout.h, 
index 85e21e8f78fdaef18dc6395f67b3c54b14688b47..f18fe87bddf292eb61640b8cbb08c0e33717c657 100644 (file)
@@ -1,3 +1,13 @@
+Fri Sep  1 15:34:46 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/gdkwindow-x11.c (gdk_window_move): Fix bug where
+       moving a toplevel window immediately after sizing it would
+       result in it being sized back to the old size since 
+       impl->width, impl->height aren't updated until we hear
+       back from the server. There is still a (longstanding) bug
+       here that gdk_window_get_size() will give the wrong size
+       until we do hear back.
+
 2000-08-31  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktextiter.h, gtk/gtktextiter.c, gtk/gtktextlayout.h, 
index 85e21e8f78fdaef18dc6395f67b3c54b14688b47..f18fe87bddf292eb61640b8cbb08c0e33717c657 100644 (file)
@@ -1,3 +1,13 @@
+Fri Sep  1 15:34:46 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/gdkwindow-x11.c (gdk_window_move): Fix bug where
+       moving a toplevel window immediately after sizing it would
+       result in it being sized back to the old size since 
+       impl->width, impl->height aren't updated until we hear
+       back from the server. There is still a (longstanding) bug
+       here that gdk_window_get_size() will give the wrong size
+       until we do hear back.
+
 2000-08-31  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktextiter.h, gtk/gtktextiter.c, gtk/gtktextlayout.h, 
index 85e21e8f78fdaef18dc6395f67b3c54b14688b47..f18fe87bddf292eb61640b8cbb08c0e33717c657 100644 (file)
@@ -1,3 +1,13 @@
+Fri Sep  1 15:34:46 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/gdkwindow-x11.c (gdk_window_move): Fix bug where
+       moving a toplevel window immediately after sizing it would
+       result in it being sized back to the old size since 
+       impl->width, impl->height aren't updated until we hear
+       back from the server. There is still a (longstanding) bug
+       here that gdk_window_get_size() will give the wrong size
+       until we do hear back.
+
 2000-08-31  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktextiter.h, gtk/gtktextiter.c, gtk/gtktextlayout.h, 
index 85e21e8f78fdaef18dc6395f67b3c54b14688b47..f18fe87bddf292eb61640b8cbb08c0e33717c657 100644 (file)
@@ -1,3 +1,13 @@
+Fri Sep  1 15:34:46 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/gdkwindow-x11.c (gdk_window_move): Fix bug where
+       moving a toplevel window immediately after sizing it would
+       result in it being sized back to the old size since 
+       impl->width, impl->height aren't updated until we hear
+       back from the server. There is still a (longstanding) bug
+       here that gdk_window_get_size() will give the wrong size
+       until we do hear back.
+
 2000-08-31  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktextiter.h, gtk/gtktextiter.c, gtk/gtktextlayout.h, 
index 85e21e8f78fdaef18dc6395f67b3c54b14688b47..f18fe87bddf292eb61640b8cbb08c0e33717c657 100644 (file)
@@ -1,3 +1,13 @@
+Fri Sep  1 15:34:46 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/gdkwindow-x11.c (gdk_window_move): Fix bug where
+       moving a toplevel window immediately after sizing it would
+       result in it being sized back to the old size since 
+       impl->width, impl->height aren't updated until we hear
+       back from the server. There is still a (longstanding) bug
+       here that gdk_window_get_size() will give the wrong size
+       until we do hear back.
+
 2000-08-31  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktextiter.h, gtk/gtktextiter.c, gtk/gtktextlayout.h, 
index bef8eef79b7a875f93511627bf52fd6c8dd59941..73ec1fe31580d42f4c2ea4d153fb33e941fd6bf8 100644 (file)
@@ -749,9 +749,19 @@ gdk_window_move (GdkWindow *window,
   g_return_if_fail (GDK_IS_WINDOW (window));
 
   impl = GDK_WINDOW_IMPL_X11 (private->impl);
-  
-  gdk_window_move_resize (window, x, y,
-                         impl->width, impl->height);
+
+  if (!GDK_WINDOW_DESTROYED (window))
+    {
+      if (GDK_WINDOW_TYPE (private) == GDK_WINDOW_CHILD)
+       _gdk_window_move_resize_child (window, x, y,
+                                      impl->width, impl->height);
+      else
+       {
+         XMoveWindow (GDK_WINDOW_XDISPLAY (window),
+                      GDK_WINDOW_XID (window),
+                      x, y);
+       }
+    }
 }
 
 void
@@ -814,6 +824,7 @@ gdk_window_move_resize (GdkWindow *window,
          XMoveResizeWindow (GDK_WINDOW_XDISPLAY (window),
                             GDK_WINDOW_XID (window),
                             x, y, width, height);
+         private->resize_count += 1;
        }
     }
 }